/*
 * @PageName: 
 * @Description: 
 * @FilePath: /glm-mes-pc/src/store/modules/dataRefresh.js
 */
const dataRefreshStore = defineStore('dataRefresh', {
	state: () => ({
		gyzlDisableBtn: false,
    gyzlTimer: null,
    pbzlDisableBtn: false,
    pbzlTimer: null,
    ddjdDisableBtn: false,
    ddjdTimer: null,
    // 样品销售订单待采购
    purchaseDisableBtn: false,
    purchaseTimer: null,
    // 样品销售订单物料待入库
    materialReceipDisableBtn: false,
    materialReceipTimer: null,
    // 样品销售订单待齐套
    toBeCompletedDisableBtn: false,
    toBeCompletedTimer: null,
    // 样品销售订单待领料
    pickUpDisableBtn: false,
    pickUpTimer: null,
    // 样品销售订单待配料
    prepareDisableBtn: false,
    prepareTimer: null,
	}),
	actions: {
    gyzlStartTimer() {
      this.gyzlDisableBtn = true;
      this.gyzlTimer = setTimeout(() => {
        this.gyzlDisableBtn = false;
      }, 60000);
    },
    pbzlStartTimer() {
      this.pbzlDisableBtn = true;
      this.pbzlTimer = setTimeout(() => {
        this.pbzlDisableBtn = false;
      }, 60000);
    },
    ddjdStartTimer() {
      this.ddjdDisableBtn = true;
      this.ddjdTimer = setTimeout(() => {
        this.ddjdDisableBtn = false;
      }, 60000);
    },
    purchaseStartTimer() {
      this.purchaseDisableBtn = true;
      this.purchaseTimer = setTimeout(() => {
        this.purchaseDisableBtn = false;
      }, 60000);
    },
    materialReceipStartTimer() {
      this.materialReceipDisableBtn = true;
      this.materialReceipTimer = setTimeout(() => {
        this.materialReceipDisableBtn = false;
      }, 60000);
    },
    toBeCompletedStartTimer() {
      this.toBeCompletedDisableBtn = true;
      this.toBeCompletedTimer = setTimeout(() => {
        this.toBeCompletedDisableBtn = false;
      }, 60000);
    },
    pickUpStartTimer() {
      this.pickUpDisableBtn = true;
      this.pickUpTimer = setTimeout(() => {
        this.pickUpDisableBtn = false;
      }, 60000);
    },
    prepareStartTimer() {
      this.prepareDisableBtn = true;
      this.prepareTimer = setTimeout(() => {
        this.prepareDisableBtn = false;
      }, 60000);
    },
    
  },
})

export default dataRefreshStore
